

String.prototype.myRepeat2 = function (count) {
    let str = ''
    while (count) {
        str += this
        count --
    }
    return str
}
console.log("12".myRepeat2(3))
